configure: Introduce CLANG variable
authorHilko Bengen <bengen@debian.org>
Tue, 22 Jan 2019 17:10:47 +0000 (18:10 +0100)
committerAndreas Dolp <dev@andreas-dolp.de>
Thu, 6 Nov 2025 16:36:49 +0000 (17:36 +0100)
Gbp-Pq: Name configure-clang-variable.patch

configure.ac

index f4e904c4d40d0ea31e75639a746bcf812f6cc267..c41f37603022d370c04a21bbee07a7bc867a6662 100644 (file)
 
     AC_SUBST([CLANG])
 
+    AC_ARG_WITH([clang],
+                [CLANG compiler],
+                [CLANG="$withval"],
+                [AS_IF([test "$compiler" = clang],
+                       [CLANG="$CC"],
+                       [AC_PATH_PROG([CLANG],[clang])])])
+
+    AC_SUBST([CLANG])
+
     case "$compiler" in
         clang)
             CLANG_CFLAGS="-Wextra -Werror-implicit-function-declaration -Wno-error=unused-command-line-argument"